<template>
<div style="position: relative;height: 100%;background: #F5F5F5;">
	<div class="lu_kuang">
		<div class="lu_kuangy">{{zhuangtai}}</div>
		<div class="lu_kuangb">{{list.kuaidigongsi}} {{list.kuaidi}}</div>
	</div>
	<div class="dizhi">
		<flexbox :gutter="0">
			<flexbox-item :span="1/7">
				<div class="flex-demo">
					<!-- <div style="display: table;margin:0 auto;"> -->
						<img src="static/address.png">
					<!-- </div> -->
				</div>
			</flexbox-item>
			<flexbox-item :span="6/7">
				<div class="flex-demo">
					<div style="display: table;">
			  			<div class="shr">{{list.username}}</div>
			  			<div class="sh_dh">{{list.phone}}</div>
			  		</div>
		  			<div class="sh_dz">{{list.user_address}}</div>
				</div>
			</flexbox-item>
		</flexbox>
		<div class="dz_line">
		  	<img src="static/huawen.jpg"/>
		</div>
  	</div>
  	<div style="width: 100%; height: 10px;background-color: #eee;"></div>
  	<div class="jifen_sc" style="background-color: #fff;">
  		<div class="jifen_scimg"><img src="static/jifenshangcheng_state.png"/></div>
  		<div class="jifen_sc1">积分商城</div>
  		<div class="clearfix"></div>
  	</div>
  	<!-- 在此循环 -->
  	<router-link v-for="value in goods" :to="{path:'/jifenshangpingxiangqing',query:{id:value.goods_id}}">
		<div class="yhtu_box">
	  		<div class="tu1_tu1">
		  		<div class="tupianone">
		  			<img :src="url + value.image" style="width: 100%;height: 100%;">
		  		</div>
		  		<div class="wenzione">
			  		<p style="font-size: 13px;color: #4a4a4a;line-height: 16px;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp:2;overflow: hidden; height: 32px;">{{value.goods_name}}</p>
			  		<p style="font-size: 12px;color: #9b9b9b;line-height: 12px;margin-top: 5px;">{{value.attr_name}}</p>
			  		<p style="line-height: 13px;font-size: 14px;color: #4A4A4A;margin-top: 9px;float: left;">{{value.jifen}} 积分</p>
			  		<p class="cheng_1">x {{value.num}}</p>
		  		</div>
	  		</div>
	  	</div>
	  </router-link>
  	<!-- 在此循环结束 --> 	
	<div class="da_ze" style="background-color: #ffffff;">
  		<div class="da_ze1">
  			<span class="dd_sp">商品总额</span>
  			<span class="dd_ss">{{list.zonger}} 积分</span>
  			<div class="clearfix"></div>
  		</div>
  		<div class="da_ze2">
  			<span class="dd_sp">运费</span>
  			<span class="dd_ss">{{list.send_money}}</span>
  			<div class="clearfix"></div>
  		</div>
	</div>
	<div class="shi_fu" style="background-color: #ffffff;">
  		<div class="shi_fu1">{{list.total_money}} 积分</div>
  		<div class="shi_fu2">实付：</div>
	</div>
	<div style="width: 100%; height: 10px;background-color: #eee;"></div>
	<div class="da_ze" style="background-color: #ffffff;">
  		<div class="da_ze1">
  			<span class="dd_sp">订单编号</span>
  			<span class="dd_ss">{{list.order_no}}</span>
  			<div class="clearfix"></div>
  		</div>
  		<div class="da_ze2">
  			<span class="dd_sp">下单时间</span>
  			<span class="dd_ss">{{list.add_time | datatime}}</span>
  			<div class="clearfix"></div>
  		</div>
	</div> 
	<div style="width: 100%; height: 10px;background-color: #eee;"></div>
	<router-link to="/jifenshangcheng">
	<div class="fan_hui">
		<input type="button" value="返回积分商城首页" class="fan_huij"/>
	</div>
	</router-link> 
	<loading :show="show2" :text="text1"></loading>	
</div>
</template>

<script>
	import { Flexbox, FlexboxItem } from 'vux'
	import axios from 'axios'
	import { mapState, mapActions } from 'vuex'
	export default {
		components: {
			Flexbox, 
			FlexboxItem,
			mapState, 
			mapActions 
		},
		data() {
			return {
				enjoy:false,
				list:'',
				zhuangtai:'',
				goods:'',
				show2:false,
				text1:'Loading...'
			}
		},
		methods: {
			enjoying(){
				this.enjoy = true;
			},
			xiaoshi(){
				this.enjoy = false;
			}
		},
		created(){
			this.show2 = true;
			var order_id = this.$route.query.order_id;
			var that = this;
			axios.post(that.url+"/home/JifenOrder/getOrdersByOrderId",{openid:this.token,order_id:order_id})
	        .then(function(res){
	        	console.log(res)
	        	that.list = res.data;
	        	if(res.data.order_status == '-1'){
	        		that.zhuangtai = '未支付';
	        	}else if(res.data.order_status == '1'){
	        		that.zhuangtai = '已支付';
	        	}else if(res.data.order_status == '2'){
	        		that.zhuangtai = '已发货';
	        	}else if(res.data.order_status == '3'){
	        		that.zhuangtai = '已完成';
	        	}
	        	that.goods = res.data.goods;
	        	that.show2 = false;
	        })
	        .catch(function(err){
	            console.log(err);
	        })
		},
		computed:{
	        ...mapState({
	            token: state => state.Token.userToken()//获取用户Token
	        }),
	    }
	}
</script>

<style scoped>
	
	*{
		/*box-sizing: border-box;*/
	}
	body{
		position: relative;
	}
	.weui-cell{
		padding: 0px 15px;
	}
	input{
		margin: 0;
		padding: 0;
		display: block;
		outline: none;
	}
	.tjdd_footer{
		width: 100%;
		height: 50px;
		position: fixed;
		bottom: 0;
		background: #FFFFFF;
		/*border: 1px solid red;
		box-sizing: border-box;*/
	}
	.heji_jine{
		float: right;
		height: 50px;
		line-height: 50px;
		font-family: "微软雅黑";
		color: #DF3033;
		font-size: 14px;
		padding-right: 3px;
		font-size: 14px;
		background-color: #FFFFFF;
	}
	.heji_text{
		float: right;
		height: 50px;
		line-height: 50px;
		color: #333333;
		background-color: #FFFFFF;
		font-size: 14px;
		
		
	}
	.tjdd_btn{
		width: 30%;
		float: right;
		/*border: 1px solid black;
		box-sizing: border-box;*/
		height: 50px;
		background-color: black;
	}
	.tjdd_btn input{
		width: 100%;
		line-height: 50px;
		background-color: #00C850;
		color: #fff;
		font-size: 16px;
		outline: none;
		border:none ;
	}
	.heji_zuo{
		width: 70%;
		height: 50px;
		float: left;
		background-color: #FFFFFF;
		/*border: 1px solid blue;
		box-sizing: border-box;*/
	}
	.sp_xj{
		margin-right: 16px;
	}
	.spxj{
		float:right;
		color: #333333;
		font-size: 15px;
	}
	.xj_jine{
		float: right;
		color: #DF3033;
		font-size: 15px;
		font-family: "微软雅黑";
	}
	.weui-cells {
    background-color: #FFFFFF;
    line-height: 1.41176471;
    font-size: 14px;
    overflow: hidden;
    position: relative;
}
	.clearfix{
		clear: both;
	}
	.cz_number{
		border-bottom: 1px solid #E5E5E5;
		width: 92%;
		margin: 0 auto;
	}
	.chongzhihaoma{
		width: 20%;
		margin: 14px 0;
		font-size: 16px;
		float: left;
	}
	.shuru{
		padding: 0 5px;
		height: 25px;
		width: calc(80% - 10px);
		font-size: 16px;
		margin: 14px 0;
		float: left;
	}
	.dizhi{
		width: 100%;
		margin: 0 auto;
		padding: 0 15px;
		display: table;
		background-color: #ffffff;
	}
	
	img,input{
		display: block;
	}
	
	.qr_xx{
		width: 80%;
		
		float: left;
		margin-top: 20px;
		/*margin-left: 10px;*/
		
	}
	.shr{
		color: #333333;
		font-size: 14px;
		float: left;
		line-height: 14px;
		margin-top:10px;
	}
	.sh_dz{
		color: #9B9B9B;
		font-size: 13px;
		line-height: 17px;
		margin-top:5px;
		margin-bottom:5px;
	}
	.sh_dh{
		float: left;
		margin-left: 10px;
		color: #333333;
		font-size: 14px;
		line-height: 14px;
		margin-top:10px;
	}
	.yjt{
		
		height: 78px;
		float: right;
		background-size: 7px;
		
		
	}
	.yjt img{
		display: block;
		height: 20px;
		width:20px;
		margin-top: 30px;
		
		
	}
	.dz_line{
		width: 100%;
		height: 2px;
	}
	.dz_line img{
		display: block;
		height: 2px;
		width: 100%;
	}
	.zgydgfqjd{
		width: 100%;
		font-size: 12px;
		color: #333333;
		margin: 10px 0;
	}
	.zg_wenzi{
		margin: 11px 0px 10px 16px;
	}
	.spxq_spnr{
		width: 100%;
		height: 78px;
		padding: 15px 0;
		/*border: 1px solid red;*/
		background-color: #fafafa;
		
	}
	.sp_xtp{
		width: 78px;
		height: 78px;
		/*border: 1px red solid;*/
		margin-left: 15px;
		float: left;
	}
	.sp_xtp img{
		width: 100%;
		display: block;
	}
	.spnr_wenzi{
		height: 78px;
		float: right;
		background-color: #FAFAFA;
		box-sizing: border-box;
		/*border: 1px solid black;*/
		position: relative;
		width: calc(100% - 108px);
		padding-right: 27px;
	}
	.spnr_text{
		font-size: 14px;
		color: #333333;
		background-color: #FAFAFA;
	}
	.sp_jt_jg{
		font-size: 16px;
		color: #DF3033;
		background-color: #FAFAFA;
	}
	.jine{
		float: left;
		font-family: "微软雅黑"
	}
	.shuliang{
		float: right;
		color: #333333;
		font-size: 12px;
		position: absolute;
		bottom: 0;
		right: 27px;
	}
	input::-webkit-input-placeholder{
		color: #949494;
		font-size: 16px;
	}
	.content1{
		width: 100%;
		border: 1px /*solid*/ red;
		color: white;
		/*border: 1px solid red;*/
	}
	
.zl{
		width: 100%;
		text-align: center;
		line-height: 20px;
		font-size: 16px;
		margin-top: 15px;
		color: #333;
	}
.gzjf{width: 100%;
		text-align: center;
		line-height: 17px;
		font-size: 13px;
		color: #7f7f7f;
		margin-top: 10px;
		padding: 0 15px;
		
	}
.lan{
		width: 100%;
		border: 1px /*solid*/ green;
		margin-top: 20px;
	}
.yq{margin: 0 auto;
		width: 100%;
		height: 44px;
		background-color: #00c850;
		color: #FFFFFF;
		line-height: 22px;
	}
.lan1{
		float: left;
		width: 100%;
		border: 1px /*solid */green;
		
		line-height: 13px;
		font-size: 13px;
		color: #333;
		margin-left: 301px;
		margin-bottom: 20px;
	}
.yq1{
		padding: 0 20px;
		width: 100%;
		height: 44px;
		background-color: white;
		color: #00C850;
		line-height: 22px;
	}
	
*{list-style: none;margin: 0;padding: 0;}
.pq li{color: #333;
	       float: left;
	       line-height: 20px;
	       font-size: 14px;
	       margin-top: 10PX;
}
.pq .tu{height: 24px;
		width: 24px;
		border-radius: 50%;
		border: 1px /*solid*/ black;
		margin: 0 3px;
		margin-top: 8PX;
		}

.pq .pqz{float: right;
		color: #7f7f7f;
		line-height: 14px;
	    font-size: 13px;
	    /*margin-top: 13PX;*/
		}
.er_er{float: right;
		color: #333;
		line-height: 18px;
	    font-size: 16px;
	    margin-top: 6px;
}
.j_f{float: right;
		color: #333;
		line-height: 17px;
	    font-size: 12px;
	    margin-top: 6px;
		
}	
.you_fei{float: right;
		color: #333;
		line-height: 17px;
	    font-size: 12px;
		margin-top: 6px;
}	
.wenzione{margin-left: 10px;
		float: right;
		box-sizing: border-box;
		border: /*solid*/ yellow 1px;
		width: calc(100% - 85px);
		}
.di{margin: 0;
			box-sizing: border-box;
			border: /*solid*/ 1PX slateblue;
			padding: 0 15px;
			}
.hyzl{float: right;
		background: #9b9b9b;
		height: 12px;
		width: 12px;
		margin-top: 5px;
		}
.ds_pqgz{margin-top: 6px;
			font-size: 12px;
			color: #333;
			float: right;
			line-height: 17px;
			}

.clearfix{float: none;
	clear: both;
	}

.tu1_box1{
	border: 1px solid red;
	border-bottom: 1px solid red;
	border: 1px /*solid*/ black;
	padding: 12px 0px;
	background: white;
	
}			
.tupianone{
	height: 75px;
	width: 75px;
	float: left;
}	
.ji_fenk1{
	border-bottom: 1px solid #EEEEEE;
	padding: 10px 10px;
	border: 1px /*solid*/ red;
	padding: 0 15px;
	background: white;
}
.jifenshangcheng{
	float: left;
	line-height: 20px;
	font-size: 14px;
	margin-left: 10px;
	margin-top: 10px
}
.yifahuo{
	float: right;
	line-height: 20px;
	font-size: 14px;
	color: #FF2E22;
	margin-top: 10px;
	margin-right: -7px;
	
	
	
}
.ji_fenk1 .tu2_tu22{
	width: 24px;
	height: 24px;
	border: 1px /*solid*/ red;
	float: left;
	background-size: 24px;
	margin-top: 8px;
	margin-left: -12px;
	padding: 0 20px;
	
}
.tu1_tu11{
	border: 1px /*solid*/ red;
	margin-top: 0px;
	padding: 0 15px;
}
.cheng_1{
	float: right;
	margin-top: 10px;
	line-height: 13px;
	font-size: 13PX;
	color: #4A4A4A;
}
.yu_fei{
	width: 100%;
	height: 44px;
	padding: 0 15px;
	border-top: 1px solid #EEEEEE;
	
}
.yun_fei{
	float: left;
	line-height: 20px;
	font-size: 14px;
	color: #333333;
	margin-top: 12px;
}
.ji_fen{
	float: right;
	line-height: 20px;
	font-size: 14px;
	color: #333333;
	margin-top: 12px;
}
.sanqi{
	float: right;
	line-height: 20px;
	font-size: 14px;
	color: red;
	margin-top: 12px;
}
.gongyi{
	float: right;
	line-height: 20px;
	font-size: 14px;
	color: #333333;
	margin-top: 12px;
}
.tuan_kuang{
		width: 180px;
		height: 100px;
		background:rgba(0,0,0,0.5);
		position: absolute;top:50%;
		left:50%;
		margin-left: -90px;
		margin-top: -50px;
		border-radius: 5px;
}
.fu_hao{
	height: 30px;
	width: 30px;
	margin: 0 auto;
	margin-top: 20px;
}
.fu_hao img{
	display: block;
	width: 100%;
}
.man_jifen{
	font-size: 13px;
	margin-top: 14px;
	text-align: center;
	color: #FFFFFF;
}
.jie_shu{
	float: right;
	font-size: 13px;
	color: #F8AF2C;
	margin-top: 9px;
}
.shishi{
	float: left;
	margin-left: 10px;
	line-height: 50px;
	font-size: 14px;
	color: #333333;
}
.y_i{
	float: left;
	
	line-height: 50px;
	font-size: 16px;
	color: #FF2E22;
}
.lu_kuang{
	height: 40px;
	width: 100%;
	background: #00c850;
	padding: 10px 15px;
}
.lu_kuangy{
	float: left;
	line-height: 20px;
	font-size: 16px;
	color: #FFFFFF;
}
.lu_kuangb{
	float: right;
	line-height: 20px;
	font-size: 13px;
	color: #FFFFFF;
}
.di_san{
	height: 40px;
	width: 100%;
	border-bottom: 1px solid #EEEEEE;
	padding: 10px 10px;
	background: white;
}
.di_sanm{
	line-height: 20px;
	font-size: 14px;
	color: #333333;
	float: left;
}
.di_sanmm{
	line-height: 20px;
	font-size: 14px;
	color: #7F7F7F;
	float: right;
}
.liuliu{
	line-height: 20px;
	color: #333333;
	font-size: 14px;
}
.di_san1{
	height: 40px;
	width: 100%;
	border-bottom: 1px solid #EEEEEE;
	padding: 10px 8px;
	background: white;
}
.meiren{
	width: 100%;
	height: 60px;
	background: white;
	border-bottom: 1px solid #EEEEEE;
	padding: 18px 15px;
	color: #333333;
	font-size: 14px;
}
.meiren img{
	float: left;
	width: 36px;
	height: 36px;
	margin-top: -5px;
	margin-right: 10px;
}
.meiren1{
	line-height: 20px;
	float: left;
	font-size: 14px;
	margin-left: 10px;
}
.meiren2{
	float: right;
	line-height: 20px;
	font-size: 13px;
	color: #9B9B9B;
}
.jifen_sc{
	width: 100%;
	height: 40px;
	padding: 10px 10px;
	color: #333333;
	font-size: 14px;
	border-bottom: 1px solid #EEEEEE;
}

.jifen_scimg{
	height: 24px;
	width: 24px;
	float: left;
}
.jifen_sc1{
	float: left;
	margin-left: 5px;
	
}
.yhtu_box{
	width: 100%;
	padding: 10px 10px;
	border-bottom: 1px solid #EEEEEE;
	display: table;
	background-color: #ffffff;
}
.da_ze{
	width: 100%;
	height: 60px;
	padding: 10px 10px;
	border-bottom: 1px solid #EEEEEE;
}
.dd_sp{
	float: left;
	line-height: 15px;
	color: #333333;
	font-size: 14px;
}
.dd_ss{
	float: right;
	line-height: 15px;
	color: #7F7F7F;
	font-size: 14px;
}
.da_ze2{
	margin-top: 10px;
	
}
.shi_fu{
	width: 100%;
	height: 40px;
	padding: 10px 10px;
	
}
.shi_fu1{
	line-height: 20px;
	font-size: 14px;
	float: right;
	color: #FF0000;
	
}
.shi_fu2{
	line-height: 20px;
	font-size: 14px;
	float: right;
	color: #333333;
}
.fan_hui{
	width: 100%;
	height: 64px;
	padding: 10px 10px;
	position: fixed;
	bottom:0px ;
	background: #FFFFFF;
}
.fan_huij{
	height: 44px;
	width: 100%;
	margin: 0 auto;
	border: none;
	outline: none;
	color: #00C850;
	background: #FFFFFF;
	border: 1px solid #00C850;
}
</style>
